package com.ld.security.auth.common.base.constants;

import com.ld.security.common.mybatis.base.constant.SuperConstant;

public class JwtFunctionConstant extends SuperConstant {


    public static funcType getFuncType(String url){
        if(url.contains("save")){
            return funcType.save;
        }else if(url.contains("remove")){
            return funcType.remove;
        }else if(url.contains("page")){
            return funcType.page;
        }else if(url.contains("all")) {
            return funcType.page;
        }else if(url.contains("select")) {
            return funcType.page;
        }
        else{
            return funcType.api;
        }
    }


    public enum funcType implements SuperEnum {
        anon("空"),
        api("控制器"),
        save("修改"),
        remove("删除"),
        page("查询"),
        ;
        private final String label;

        funcType(String label) {
            this.label = label;
        }


        @Override
        public String getValue() {
            return this.name();
        }

        @Override
        public String getLabel() {
            return this.label;
        }
    }




}
